1. Field of the Invention
The present general inventive concept generally relates to an image coder-decoder (CODEC), and more particularly, to a method and apparatus to encode and decode a halftone image such that the halftone image is efficiently compressed and decoded by using pattern characteristics of the halftone image.
2. Description of the Related Art
Generally, an image output apparatus such as a digital printer or a duplicator substantially conveys various color impressions with only two colors, white and black. For example, a digital color printer expresses a color image displayed on a monitor with only two values of black and white. In order to output color images of various brightnesses displayed on the monitor through the color printer, the color printer or a personal computer (PC) performs a procedure for converting an input image into a binary image. That is, the color printer or the PC performs a process of converting the input image of pixels into an image having a gray scale between 0 and 255 and a process of converting the image having the gray scale into the binary image. The image having the gray scale between 0 and 255 is referred to as a gray-scale image and the process of converting the gray-scale image into the binary image is called half-toning.
Generally, in order to reduce an amount and speed of data transmission, a host device compresses binary image data that has undergone half-toning by using a compression scheme such as joint bi-level image experts group (JBIG) or JBIG2 and then transmits the compressed binary image data to an image forming apparatus. The image forming apparatus decodes the compressed binary image data and then performs a printing task.
In JBIG established as a standard for binary image compression, a halftone compression scheme involves setting a template for predicting a probability of a pixel and performing binary arithmetic encoding by using the template. Herein, the template refers to a position pattern of a reference pixel.
However, according to a conventional binary image compression scheme, binary arithmetic encoding is performed by using identical template information for color channels, resulting in low compression rate.